package com.hujing.log.controller;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    private static final Logger log = LoggerFactory.getLogger(TestController.class);

    @GetMapping("/test")
    public void test() {
        try {
            int i = 10 / 0;
        } catch (Exception e) {
            log.error("Error occurred：{}", e.getMessage(), e);
        }
        log.info("test");
    }

}
